package com.tmxk.days01.carrental_wmh;

/**
 * 汽车租赁平台 -- 抽象父类
 * @author Administrator
 * 汽车类(MotoVehicle)的属性有车牌号(vehicleId)、品牌(brand)、日租金(perRent)
 *
 */
public abstract class MotoVehicle {
    private String vehicleId;
    private String brand;
    private int perRent;
    public String getVehicleId() {
        return vehicleId;
    }
    public void setVehicleId(String vehicleId) {
        this.vehicleId = vehicleId;
    }
    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }
    public int getPerRent() {
        return perRent;
    }
    public void setPerRent(int perRent) {
        this.perRent = perRent;
    }

    public MotoVehicle() {
    }

    public MotoVehicle(String vehicleId, String brand, int perRent) {
        super();
        this.vehicleId = vehicleId;
        this.brand = brand;
        this.perRent = perRent;
    }

    /**
     * 计算日租金的方法
     * @param days  租赁天数
     * @return   租赁价钱
     */
    public abstract float calRent(int days);


    @Override
    public String toString() {
        return "机动车信息: [vehicleId=" + vehicleId + ", brand=" + brand + ", perRent=" + perRent + "]";
    }

}

